import {
    LOGIN,
    REGISTER,
    CUSTOMER_MANAGEMENT,
    CUSTOMER_TYPE_MANAGEMENT,
    MAIL_MANAGEMENT,
    BLACKLIST_MANAGEMENT,
    SEND_MAILBOX_MANAGEMENT,
    USER,
    SEARCH
  } from "@/router/name";

  export default [
    {
      path: "/login",
      component: () => import("../layouts/LoginLayouts"),
      meta: { requiresAuth: false },
    },
    {
      path: "/customer",
      component: () => import("../layouts/MainLayout"),
      meta: {requiresAuth: true},
      children: [
        {
          name: CUSTOMER_MANAGEMENT,
          path: "list",
          component: () => import("@/views/customer/CustomerList.vue")
        },
        {
          name: CUSTOMER_TYPE_MANAGEMENT,
          path: "type",
          component: () => import("@/views/customer/CustomerTypeManagement.vue")
        },
        {
          name: BLACKLIST_MANAGEMENT,
          path: "blacklist",
          component: () => import("@/views/customer/Blacklist.vue")
        },
        {
          name: MAIL_MANAGEMENT,
          path: "mail",
          component: () => import("@/views/mail/MailManagement.vue")
        },
        {
          name: SEND_MAILBOX_MANAGEMENT,
          path: "sendbox",
          component: () => import("@/views/mail/SendMailBoxManagement.vue")
        }
      ]
    },
    {
      path: "/search",
      component: () => import("../layouts/MainLayout"),
      meta: {requiresAuth: true},
      children: [
        {
          name: SEARCH,
          path: "",
          component: () => import("@/views/search/Search.vue")
        }
      ]
    },
    {
      path: "/user",
      component: () => import("../layouts/MainLayout"),
      meta: {requiresAuth: true},
      children: [
        {
          name: USER,
          path: "",
          component: () => import("@/views/user/UserManagement.vue")
        }
      ]
    }
  ]